<template>
  <view class="model">
    <view class="modelInner">
      <view class="title">重新授权</view>
      <view class="location">
        <text>
          请重新授权您的地理位置，
          授权完成后方可参与活动哦~
        </text>
      </view>
      <view class="btnBottom size26 center">
        <view class="btnRefuse" @click="refuse" >拒绝</view>
        <button class="btnAgree" open-type="openSetting" @opensetting="handler">前往设置</button>
      </view>
    </view>
  </view>
</template>
<script>
export default {
    methods:{
        refuse(){
            uni.showToast({icon:'none',title:'拒绝定位将无法参与活动哦'})
        },
        handler(){
            this.$emit('getlocation')
        }
    }
};
</script>
<style lang="scss" scoped>
.model {
  width: 750rpx;
  height: 100vh;
  position: absolute;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  .title{
      text-align: center;
      font-size: 32rpx;
  }
}
.modelInner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 580rpx;
  height: 420rpx;
  background-color: #fff;
  border-radius: 10rpx;
  padding-top: 30rpx;
  overflow: hidden;
}
.btnBottom {
  width: 100%;
  height: 72rpx;
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
}

.btnRefuse,
.btnAgree {
  width: 50%;
  height: 100%;
  line-height: 72rpx;
  font-size: 26rpx;
  text-align: center;
}

.btnRefuse {
  color: #999;
  background-color: #e7e7e7;
}

.btnAgree {
  color: #fff;
  background-color: green;
  font-size: 26rpx;
}
.location {
  margin-top: 90rpx;
  line-height: 46rpx;
  text-align: center;
  font-size: 26rpx;
}
</style>